

//对象按照价格升序
export const sortByPriceAsc = (objects: any) => {
  objects.value.sort((a: any, b: any) => a.price - b.price)
}

//对象按照价格降序
export const sortByPriceDesc = (objects: any) => {
  objects.value.sort((a: any, b: any) => b.price - a.price)
}